#lang racket


(provide
 (struct-out node)
 
 ; points
 
 (struct-out point-node)
 

 ; lines
 
 (struct-out arc-node)
 (struct-out elliptical-arc-node)
 (struct-out ellipse-node)
 (struct-out line-node)
 (struct-out nurbs-curve-node)
 (struct-out spline-node)
 
 
 ; surfaces
 
 (struct-out donut-node)
 (struct-out ngon-node)
 (struct-out nurbs-surface-node)
 (struct-out star-node)
 (struct-out surface-node)
 
 
 ; solids
 
 (struct-out box-node)
 (struct-out cone-node)
 (struct-out cone-frustrum-node)
 (struct-out cylinder-node)
 (struct-out pyramid-node)
 (struct-out sphere-node)
 
 
 ; generic shapes
 
 (struct-out circle-node)
 (struct-out rectangle-node)
 
 
 ; transformations
 
 (struct-out extrude-node)
 (struct-out intersect-node)
 (struct-out join-node)
 (struct-out loft-node)
 (struct-out move-node)
 (struct-out offset-node)
 (struct-out rotate-node)
 (struct-out scale-node)
 (struct-out subtract-node)
 (struct-out sweep-node)
 (struct-out thicken-node)
 (struct-out union-node)
 
 
 ; lang
 
 (struct-out align-node)
 (struct-out on-node)
 (struct-out view-node))


; node

(struct node ())


; points

(struct point-node node (c))

 
; lines

(struct arc-node node (angle radius))
(struct elliptical-arc-node node (angle x-radius y-radius))
(struct ellipse-node node (x-radius y-radius))
(struct line-node node (closed? cs))
(struct nurbs-curve-node node (controls knots))
(struct spline-node node (closed? cs type))


; surfaces

(struct donut-node node (inner-radius outer-radius))
(struct ngon-node node (width sides))
(struct nurbs-surface-node node (controls u-knots v-knots))
(struct star-node node (width sides stride))
(struct surface-node node (shapes))


; solids

(struct box-node node (width length height))
(struct cone-node node (radius height))
(struct cone-frustrum-node node (base-radius top-radius height))
(struct cylinder-node node (radius height))
(struct pyramid-node node (width sides height))
(struct sphere-node node (radius))


; generic shapes

(struct circle-node node (type radius))
(struct rectangle-node node (width length))


; transformations

(struct extrude-node node (length shape))
(struct intersect-node node (shape1 shape2))
(struct join-node node (shapes))
(struct loft-node node (closed? shapes))
(struct move-node node (c shape))
(struct offset-node node (distance shape))
(struct rotate-node node (angle normal shape))
(struct scale-node node (c shape))
(struct subtract-node node (shape1 shape2))
(struct sweep-node node (path shape))
(struct thicken-node node (distance shape))
(struct union-node node (shape1 shape2))


; lang

(struct align-node node (type shape))
(struct on-node node (type shapes))
(struct view-node node (type projection-type lens shape/shapes))